<?php

/**
 * Tesis filter form.
 *
 * @package    sistema_estadisticas
 * @subpackage filter
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormFilterTemplate.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class TesisFormFilter extends BaseTesisFormFilter
{

	public function configure()
	{
		$this->widgetSchema['director_id'] = new WidgetFormAutocomplete(
			array(
				'model' => 'Docente',
				'action' => 'docente/buscar'
			)
		);

		$this->widgetSchema['tema'] = new sfWidgetFormFilterInput();
		$this->validatorSchema['tema'] = new sfValidatorPass();

		$this->widgetSchema['estado'] = new WidgetFormFilterChoice(array('choices' => Constantes::$ESTADOS_TESIS));

		$this->configureDateWidget('f_aprobacion'); //BaseFormFilterDoctrine
	}

	public function addTemaColumnQuery(Doctrine_Query $query, $field, $values)
	{
		$this->createTextQuery($query, 'tema', $values, 'p');
	}

}
